package com.zhongxi.guoyuan.view.user;

import android.view.View;
import android.widget.TextView;

import com.handmark.pulltorefresh.library.PullToRefreshListView;
import com.zhongxi.guoyuan.R;
import com.zhongxi.guoyuan.adapter.AddressAdapter;
import com.zhongxi.guoyuan.base.BaseActivity;

import java.util.ArrayList;
import java.util.List;

public class DeliveryAddressActivity extends BaseActivity implements View.OnClickListener {

    private PullToRefreshListView lvList;
    private List<String> list = new ArrayList<>();
    private TextView tvAddAddress;
    private TextView tvComplete;

    @Override
    protected void initView() {
        super.initView();
        setContentView(R.layout.activity_delivery_address);
        initTitle();
        tvTitle.setText("收货地址");
        lvList = (PullToRefreshListView) findViewById(R.id.lvList);
        tvAddAddress = (TextView) findViewById(R.id.tvAddAddress);
        tvComplete = (TextView) findViewById(R.id.tvComplete);
    }

    @Override
    protected void initData() {
        super.initData();
        list.add("a");
        list.add("a");
        list.add("a");
        list.add("a");
        list.add("a");
        list.add("a");
        list.add("a");
        AddressAdapter adapter = new AddressAdapter(context, list);
        lvList.setAdapter(adapter);
    }

    @Override
    protected void initEvent() {
        super.initEvent();
        ivBack.setOnClickListener(this);
        tvAddAddress.setOnClickListener(this);
        tvComplete.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.ivBack:
                finish();
                break;
            case R.id.tvAddAddress:
                break;
            case R.id.tvComplete:
                break;
        }
    }
}
